home *** CD-ROM | disk | FTP | other *** search
/ Motor Sport Digital Archive Collection 1960s / Motor Sport Digital Archive Collection 1960s.iso / main.swf / scripts / mx / rpc / events / ResultEvent.as < prev   
Encoding:
Text File  |  2008-05-21  |  1.5 KB  |  52 lines

  1. package mx.rpc.events
  2. {
  3.    import flash.events.Event;
  4.    import mx.core.mx_internal;
  5.    import mx.messaging.messages.IMessage;
  6.    import mx.rpc.AsyncToken;
  7.    
  8.    use namespace mx_internal;
  9.    
  10.    public class ResultEvent extends AbstractEvent
  11.    {
  12.       public static const RESULT:String = "result";
  13.       
  14.       private var _result:Object;
  15.       
  16.       public function ResultEvent(param1:String, param2:Boolean = false, param3:Boolean = true, param4:Object = null, param5:AsyncToken = null, param6:IMessage = null)
  17.       {
  18.          super(param1,param2,param3,param5,param6);
  19.          _result = param4;
  20.       }
  21.       
  22.       public static function createEvent(param1:Object = null, param2:AsyncToken = null, param3:IMessage = null) : ResultEvent
  23.       {
  24.          return new ResultEvent(ResultEvent.RESULT,false,true,param1,param2,param3);
  25.       }
  26.       
  27.       override mx_internal function callTokenResponders() : void
  28.       {
  29.          if(token != null)
  30.          {
  31.             token.mx_internal::applyResult(this);
  32.          }
  33.       }
  34.       
  35.       override public function clone() : Event
  36.       {
  37.          return new ResultEvent(type,bubbles,cancelable,result,token,message);
  38.       }
  39.       
  40.       public function get result() : Object
  41.       {
  42.          return _result;
  43.       }
  44.       
  45.       override public function toString() : String
  46.       {
  47.          return formatToString("ResultEvent","messageId","type","bubbles","cancelable","eventPhase");
  48.       }
  49.    }
  50. }
  51.  
  52.